package shajie.shajun.mmhf.ViewModel;

import android.content.SharedPreferences;

import shajie.shajun.mmhf.Public_Data;

import static android.content.Context.MODE_PRIVATE;

/**
 * Created by admin on 2017/11/27.
 */

public class FileData {
    private static volatile FileData fileData=null;

    public static FileData newInstance(){
        if (fileData==null){
            synchronized (FileData.class){
                if (fileData==null){
                    fileData=new FileData();
                }
            }

        }
        return fileData;
    }

    public void savebeizhu(String s){
        SharedPreferences.Editor editor = Public_Data.context.getSharedPreferences("MMHF",
                MODE_PRIVATE).edit();
        editor.putString("备注", s);
        editor.commit();
    }
    public String getbeizhu(){
        SharedPreferences pref =Public_Data.context. getSharedPreferences("MMHF",
                MODE_PRIVATE);
       return pref.getString("备注", "");
    }
}
